package com.demo.bean.mapper.news;

import com.demo.common.entity.News;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 新闻动态
 * 作者：张佑威
 * 补充：孙佳佳
 */
@Mapper
@Repository
public interface NewsMapper {
    /**
     * 新闻分页
     * @param pagenum
     * @return
     */
    List<News> search(@Param("pagenum") Integer pagenum);

    @Select("select * from news where news_id = #{NewsId}")
    News selectByNewsId(@Param("NewsId")Integer NewsId);

    List<News> newsproduct(@Param("id")Integer id,@Param("pagenum") Integer pagenum);

}
